package com.wondersgroup.shys.framework.ws;

public class DispatcherServiceProxy implements com.wondersgroup.shys.framework.ws.DispatcherService {
  private String _endpoint = null;
  private com.wondersgroup.shys.framework.ws.DispatcherService dispatcherService = null;
  
  public DispatcherServiceProxy() {
    _initDispatcherServiceProxy();
  }
  
  public DispatcherServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initDispatcherServiceProxy();
  }
  
  private void _initDispatcherServiceProxy() {
    try {
      dispatcherService = (new SendRecv_ServiceLocator()).getdispatcher();
      if (dispatcherService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)dispatcherService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)dispatcherService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (dispatcherService != null)
      ((javax.xml.rpc.Stub)dispatcherService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.wondersgroup.shys.framework.ws.DispatcherService getDispatcherService() {
    if (dispatcherService == null)
      _initDispatcherServiceProxy();
    return dispatcherService;
  }
  
  public java.lang.String sendRecv(java.lang.String sUser, java.lang.String sPwd, java.lang.String sJgbm, java.lang.String sVersion, java.lang.String sXxlx, java.lang.String sSign, java.lang.String xmlData) throws java.rmi.RemoteException{
    if (dispatcherService == null)
      _initDispatcherServiceProxy();
    return dispatcherService.sendRecv(sUser, sPwd, sJgbm, sVersion, sXxlx, sSign, xmlData);
  }
  
  
}